<?php
/**
 * TomatoCMS
 *
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 *
 * @copyright    Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license        http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version     $Id: list.phtml 3032 2010-05-25 08:00:42Z huuphuoc $
 */
?>
<?php
$this->headTitle($this->translator('advertise_enterprise_page_title'));
$this->headLink()
	 ->appendStylesheet($this->APP_STATIC_SERVER . '/js/jquery.ui/themes/base/ui.all.css')
	 ->appendStylesheet($this->APP_STATIC_SERVER . '/js/jquery.ui/themes/base/ui.tabs.css')
	 ;
    $this->headScript()
        ->appendFile($this->APP_STATIC_SERVER . '/js/jquery.tools/jquery.tools.js');	 
$this->headScript()
    ->appendFile($this->APP_STATIC_SERVER . '/js/jquery.validate/jquery.validate.min.js')
	->appendFile($this->APP_STATIC_SERVER . '/js/jquery.ui/ui.core.js')
	->appendFile($this->APP_STATIC_SERVER . '/js/jquery.ui/ui.tabs.js')	
    ;
	$skin_url = $this->APP_STATIC_SERVER . '/skins/bizprofile/'. $this->APP_SKIN;	
?>
<script src="<?php echo $skin_url; ?>/html/js/jquery.translate.min.js" type="text/javascript"></script>
<style>
	.tooltip {
        display:none;
        background:#BCBBB9;
        height:auto;
        width:200px;
        padding:0px;
		color: yellow;
    }
	.auto_trans{		
	}
</style>
<?php
	function trans($key){
		$lang_en = TOMATO_APP_DIR . DS . 'modules' . DS . "advertise" . DS . 'languages' . DS . 'lang.en_US.ini';
		if (file_exists($lang_en) && file_get_contents($lang_en) != '') {
			$translate = new Zend_Translate('Ini', $lang_en, 'en_US');
			return $translate->_($key);
		}else{
			return $key;
			}
	}
    $serUrl = $this->APP_STATIC_SERVER. "/images/advertise/enterprise";	
?>
<script language="javascript">
	function bindAction(){
		$(".deleteLinks").bind("click",function(){
			$(this).parent("div").parent("div").remove();
		});
		$(".deleteVips").bind("click",function(){
			$(this).parent("div").parent("div").remove();
		});		
		$(".deleteAdvs").bind("click",function(){
			$(this).parent("div").parent("div").remove();
		});
		$(".deleteSlogans").bind("click",function(){
			$(this).parent("div").parent("div").remove();
		});
		$(".deleteProfessions").bind("click",function(){
			$(this).parent("div").parent("div").remove();
		});
		$('.auto_trans').bind('click',function(){
			var text ="";
			$(this).parent('.en_US').each(function(){
				text = eval($(this).attr("rel"));
			});
			var this_ =  this;
			$.translate( text , 'en', {
			  complete: function(translation){ 
				$(this_).prev().val(translation);
			  }
			});
		});
		
		$(".auto_trans").each(function(){
			var ok = true;
			if($(this).parents('#regex_professions').size()>0) ok = false;
			if($(this).parents('#regex_links').size()>0) ok = false;
			if($(this).parents('#regex_vips').size()>0) ok = false;
			if($(this).parents('#regex_advs').size()>0) ok = false;
			if($(this).parents('#regex_slogans').size()>0) ok = false;
			if(ok)	
			if($(this).attr("rel")!= "hasTooltip"){
				var this_ = $(this);
				$(this).tooltip({ 
					effect: 'slide',					    		
					offset: [10, 2],
					opacity: 0.9,
					relative: false,
					onShow: function() {
						var conf   = this.getConf();
						var source = conf.source;
						var text = "";
						source.parent('.en_US').each(function(){
							text = eval($(this).attr("rel"));
						});
						if(text=="undefined") text ="";
						var html_tip  =  "<h4 class='ui-widget-header' style='font-size:10px;'>Auto translate from vietnamese</h4><div class='ui-widget-content'>";
							html_tip +=  text + '</div>';						
						tip = this.getTip();
						tip.html(html_tip);
						var w_   = tip.width();
						var h_   = tip.height();
						
						var top  = source.offset().top; 
						var left = source.offset().left;
						top  = top  - h_ - 5;
						left = left - Math.floor(w_ / 2);
						tip.css('top',top);
						tip.css('left',left);						
						this.show();
					},
					source: this_
				}).dynamic({ bottom: { direction: 'down', bounce: true } }); 
				$(this).attr("rel","hasTooltip");				
			}
		});		
	}
	function showTabs(tabId){
		tabId = tabId.replace("#","");
		$(".tabs").hide();
		$("#tabs_"+tabId).show();
		$("#menu_tabs").find("li").removeClass("ui-state-error");
		$("#menu_tabs").find("a[href*='"+tabId+"']").parent("li").addClass('ui-state-error');
	}
	$(document).ready(function(){			
		$(".en_US").hide();
		bindAction();
		$(".btn_add_links").click(function(){
			$("#regex_links .t_a_ui_data_list_content").clone().appendTo("#list_links");
			bindAction();
		});
		$(".btn_add_vips").click(function(){
			$("#regex_vips .t_a_ui_data_list_content").clone().appendTo("#list_vips");
			bindAction();			
		});
		$(".btn_add_advs").click(function(){
			$("#regex_advs .t_a_ui_data_list_content").clone().appendTo("#list_advs");
			bindAction();			
		});
		$(".btn_add_slogans").click(function(){
			$("#regex_slogans .t_a_ui_data_list_content").clone().appendTo("#list_slogans");
			bindAction();			
		});
		$(".btn_add_professions").click(function(){
			$("#regex_professions .t_a_ui_data_list_content").clone().appendTo("#list_professions");
			bindAction();			
		});		
		showTabs("#<?php echo $this->action_type;?>");	
		$("#menu_tabs").find("a").click(function(){
			showTabs($(this).attr("href"));
			return false;
		});		
	});
</script>
<style>
	#menu_tabs ul li{	
		padding: 5px;
		margin-right: 5px;
		float: left;
	}
	#menu_tabs ul li:hover{
		background-color: #FCBADF;
	}
	.mainpage_img{
		text-align: left;
		margin-top: 6px;
	}
	.mainpage_img label{
		float: left;
		margin-left: 0px;
		width: auto;
		margin-right: 5px;
	}
	.mainpage_img img{
		border: 1px solid #CCCCCC;
		width: 150px;
		height: 100px;
	}
</style>
<table style="width:100%;margin-bottom:15px;">
	<tr>
		<td>
			<h3 style="width:300px;"><?php echo $this->translator("mainpage_title");?></h3>
			<h3 style="width:300px;" class="en_US"><?php echo trans("mainpage_title");?></h3>
		</td>
		<td width="100" align="right">
			<span>
					<a href="#" onclick="$('.en_US').hide();$('.en_US').prev().show();return false;">
						<img src="<?php echo $this->APP_STATIC_SERVER;?>/images/flags/vi_VN.png">
					</a>&nbsp;&nbsp;
					<a href="#" onclick="$('.en_US').show();$('.en_US').prev().hide();return false;">
						<img src="<?php echo $this->APP_STATIC_SERVER;?>/images/flags/en_US.png">
					</a>&nbsp;&nbsp;	
			</span>
		</td>
	</tr>
</table>

<div id="menu_tabs">
	<ul class="ui-tabs-nav ui-helper-reset">
		<li class="ui-state-default ui-corner-top <?php if($this->action_type=="links") echo "ui-state-error"; ?>">
			<a href="#links"><?php echo $this->translator('mainpage_link');?></a>
			<a href="#links" class="en_US"><?php echo trans('mainpage_link');?></a>
		</li>
		<li class="ui-state-default ui-corner-top <?php if($this->action_type=="vips") echo "ui-state-error"; ?>">
			<a href="#vips"><?php echo $this->translator('mainpage_vips');?></a>
			<a href="#vips" class="en_US"><?php echo trans('mainpage_vips');?></a>
		</li>
		<li class="ui-state-default ui-corner-top <?php if($this->action_type=="advs") echo "ui-state-error"; ?>">
			<a href="#advs"><?php echo $this->translator('mainpage_advs');?></a>
			<a href="#advs" class="en_US"><?php echo trans('mainpage_advs');?></a>
		</li>
		<li class="ui-state-default ui-corner-top <?php if($this->action_type=="slogans") echo "ui-state-error"; ?>">
			<a href="#slogans"><?php echo $this->translator('mainpage_slogans');?></a>
			<a href="#slogans" class="en_US"><?php echo trans('mainpage_slogans');?></a>
		</li>
		<li class="ui-state-default ui-corner-top <?php if($this->action_type=="professions") echo "ui-state-error"; ?>">
			<a href="#professions"><?php echo $this->translator('mainpage_professions');?></a>
			<a href="#professions" class="en_US"><?php echo trans('mainpage_professions');?></a>
		</li>
	</ul>
</div>
<div class="tabs" id="tabs_links">
	<!-- FORM LINKS -->
	<form action="" method="post" name="formLinks" id="formLinks">
	<input type="hidden" name="action_type" value="links"/>
	<div class="clearfix">				
		<div class="grid_12 t_a_ui_breadcrumb">
			<span><?php echo $this->translator('mainpage_link');?></span>
			<span class="en_US"><?php echo trans('mainpage_link');?></span>
		</div>
		<div class="grid_12 t_a_bottom">
			<div class="grid_10 alpha"><?php echo $this->translator("mainpage_page_title_links");?>:</div>			
			<div class="grid_10 alpha en_US"><?php echo trans("mainpage_page_title_links");?>:</div>
			<div class="grid_2 omega">
				<div class="t_a_right">
					<a class="t_a_ui_button_link btn_add_links" href="javascript: void(0);"><span><?php echo $this->translator("mainpage_add_links");?></span></a>
					<a class="t_a_ui_button_link btn_add_links en_US" href="javascript: void(0);"><span><?php echo trans("mainpage_add_links");?></span></a>
				</div>
			</div>
		</div>

		<div class="grid_12 t_a_ui_data_list_header">
			<div class="grid_6 alpha">
				<div><?php echo $this->translator("mainpage_name_link");?></div>
				<div class="en_US"><?php echo trans("mainpage_name_link");?></div>
			</div>
			
			<div class="grid_5">
				<?php echo $this->translator("mainpage_url_link");?>
			</div>
			<div class="grid_5 en_US">
				<?php echo trans("mainpage_url_link");?>
			</div>
			<div class="grid_1 omega">#</div>
		</div>

		<div class="grid_12 t_a_bottom" id="list_links">
			<?php 
				if($this->links)
					foreach($this->links as $item):
			?>	
			<div class="clearfix t_a_ui_data_list_content">
				<div class="grid_6 alpha">
					<input type="text" name="links[name][]" value="<?php echo @$item["name"];?>"/> 	
				</div>	
				<div class="grid_6 alpha en_US" rel="$(this).prev().find('input').val()">
					<input type="text" name="links[name_en][]" value="<?php echo @$item["name_en"];?>"/> 										
					<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>
				</div>				
				<div class="grid_5">
					<input type="text" name="links[url][]" value="<?php echo @$item["url"];?>"/>
				</div>
				<div class="grid_1 omega t_a_ui_helper_action">
					<a class="deleteAction deleteLinks" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
					<a class="deleteAction deleteLinks en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
				</div>
				
			</div>
			<?php endforeach;?>
		</div>
		<div class="grid_12 t_a_bottom">
			<button type="submit"><span style="height:30px; text-align:center; width:auto;" >
				<?php echo $this->translator('mainpage_save_button');?>
			</span></button>			
			<button type="submit" class="en_US"><span style="height:30px; text-align:center; width:auto;" >
				<?php echo trans('mainpage_save_button');?>
			</span></button>			
			
		</div>
	</div>	
</form>
	<!-- END FORM LINK -->
</div>
<div class="tabs" id="tabs_vips">
	<!-- FORM VIPS -->
	<form action="" method="post" name="formVips" id="formVips" enctype="multipart/form-data">
	<input type="hidden" name="action_type" value="vips"/>
	<div class="clearfix">				
		<div class="grid_12 t_a_ui_breadcrumb">
			<span><?php echo $this->translator('mainpage_vips');?></span>
			<span class="en_US"><?php echo trans('mainpage_vips');?></span>
		</div>
		<div class="grid_12 t_a_bottom">
			<div class="grid_8 alpha"><?php echo $this->translator("mainpage_page_title_vips");?>:</div>
			<div class="grid_8 alpha en_US"><?php echo trans("mainpage_page_title_vips");?>:</div>
			<div class="grid_4 omega">
				<div class="t_a_right">
					<a class="t_a_ui_button_link btn_add_vips" href="javascript: void(0);"><span><?php echo $this->translator("mainpage_add_vips");?></span></a>
					<a class="t_a_ui_button_link btn_add_vips en_US" href="javascript: void(0);"><span><?php echo trans("mainpage_add_vips");?></span></a>
				</div>
			</div>
		</div>

		<div class="grid_12 t_a_ui_data_list_header">
			<div class="grid_4 alpha">
				<div><?php echo $this->translator("mainpage_img_url_vips");?></div>
				<div class="en_US"><?php echo trans("mainpage_img_url_vips");?></div>
			</div>
			
			<div class="grid_4">
				<?php echo $this->translator("mainpage_vip_info_vips");?>
			</div>
			<div class="grid_4 en_US">
				<?php echo trans("mainpage_vip_info_vips");?>
			</div>
			<div class="grid_3">
				<?php echo $this->translator("mainpage_qoute_vips");?>
			</div>
			<div class="grid_3 en_US">
				<?php echo trans("mainpage_qoute_vips");?>
			</div>
			<div class="grid_1 omega">#</div>
		</div>

		<div class="grid_12 t_a_bottom" id="list_vips">
			<?php 
				if($this->vips)
					foreach($this->vips as $index => $item):
			?>	
			<div class="clearfix t_a_ui_data_list_content">
				<div class="grid_4 alpha">		
					<input type="file" name="vips_file[]">
					<input type="hidden" name="vips[img_url][]" value="<?php echo @$item["img_url"];?>"/>
					<?php if(@$item["img_url"]):?>
						<div class="mainpage_img">
							<label><?php echo $this->translator("mainpage_img");?></label>
							<label class="en_US"><?php echo trans("mainpage_img");?></label>
							<img src="<?php echo @$item["img_url"];?>">
						</div>
					<?php else: ?>	
						<label><?php echo $this->translator("main_page_no_image");?></label>
						<label class="en_US"><?php echo trans("main_page_no_image");?></label>
					<?php endif;?>	
				</div>				
				<div class="grid_4">	
					<div class="grid_4">
						<label style="width:80px;"><?php echo $this->translator("mainpage_vip_name_vips");?></label>
						<label class="en_US" style="width:80px;"><?php echo trans("mainpage_vip_name_vips");?></label>
						<input type="text" name="vips[vip_name][]" value="<?php echo @$item["vip_name"];?>"/>
					</div>
					<div class="grid_4">
						<label style="width:80px;"><?php echo $this->translator("mainpage_vip_positions_vips");?></label>
						<label class="en_US" style="width:80px;"><?php echo trans("mainpage_vip_positions_vips");?></label>
						<input type="text" name="vips[vip_positions][]" value="<?php echo @$item["vip_positions"];?>"/>
					</div>
					<div class="grid_4 en_US" rel="$(this).prev().find('input').val()">
						<label style="width:80px;"><?php echo $this->translator("mainpage_vip_positions_vips");?></label>
						<label class="en_US" style="width:80px;"><?php echo trans("mainpage_vip_positions_vips");?></label>
						<input type="text" name="vips[vip_positions_en][]" value="<?php echo @$item["vip_positions_en"];?>"/>
						<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>						
					</div>					
				</div>
				<div class="grid_3">		
					<textarea name="vips[qoute][]"><?php echo @$item["qoute"];?></textarea>
				</div>
				<div class="grid_3 en_US" rel="$(this).prev().find('textarea').val()">		
					<textarea name="vips[qoute_en][]"><?php echo @$item["qoute_en"];?></textarea>
					<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>											
				</div>
				<div class="grid_1 omega t_a_ui_helper_action">
					<a class="deleteAction deleteVips" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
					<a class="deleteAction deleteVips en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
				</div>				
			</div>
			<?php endforeach;?>
		</div>
		<div class="grid_12 t_a_bottom">
			<button type="submit"><span style="height:30px; text-align:center; width:auto;" >
				<?php echo $this->translator('mainpage_save_button');?>
			</span></button>			
			<button type="submit" class="en_US"><span style="height:30px; text-align:center; width:auto;" >
				<?php echo trans('mainpage_save_button');?>
			</span></button>			
		</div>
	</div>	
</form>
	<!-- END FORM VIPS -->
</div>
<div class="tabs" id="tabs_advs">
	<!-- FORM ADVS -->
	<form action="" method="post" name="formAdvs" id="formAdvs" enctype="multipart/form-data">
		<input type="hidden" name="action_type" value="advs"/>
		<div class="clearfix">				
			<div class="grid_12 t_a_ui_breadcrumb">
				<span><?php echo $this->translator('mainpage_advs');?></span>
				<span class="en_US"><?php echo trans('mainpage_advs');?></span>
			</div>
			<div class="grid_12 t_a_bottom">
				<div class="grid_8 alpha"><?php echo $this->translator("mainpage_page_title_advs");?>:</div>
				<div class="grid_8 alpha en_US"><?php echo trans("mainpage_page_title_advs");?>:</div>
				<div class="grid_4 omega">
					<div class="t_a_right">
						<a class="t_a_ui_button_link btn_add_advs" href="javascript: void(0);"><span><?php echo $this->translator("mainpage_add_advs");?></span></a>
						<a class="t_a_ui_button_link btn_add_advs en_US" href="javascript: void(0);"><span><?php echo trans("mainpage_add_advs");?></span></a>
					</div>
				</div>
			</div>

			<div class="grid_12 t_a_ui_data_list_header">
				<div class="grid_6 alpha">
					<div><?php echo $this->translator("mainpage_img_url_advs");?></div>
					<div class="en_US"><?php echo trans("mainpage_img_url_advs");?></div>
				</div>
				
				<div class="grid_5">
					<?php echo $this->translator("mainpage_link_advs");?>
				</div>
				<div class="grid_5 en_US">
					<?php echo trans("mainpage_link_advs");?>
				</div>
				<div class="grid_1 omega">#</div>
			</div>

			<div class="grid_12 t_a_bottom" id="list_advs">
				<?php 
					if($this->advs)
						foreach($this->advs as $item):
				?>	
				<div class="clearfix t_a_ui_data_list_content">
					<div class="grid_6 alpha">				
						<input type="file" name="advs_file[]">
						<input type="hidden" name="advs[img_url][]" value="<?php echo @$item["img_url"];?>"/> 	
						<?php if(@$item["img_url"]):?>
							<div class="mainpage_img">
								<label><?php echo $this->translator("mainpage_img");?></label>
								<label class="en_US"><?php echo trans("mainpage_img");?></label>
								<img src="<?php echo @$item["img_url"];?>">
							</div>
						<?php else: ?>	
							<label><?php echo $this->translator("main_page_no_image");?></label>
							<label class="en_US"><?php echo trans("main_page_no_image");?></label>
						<?php endif;?>	
						
					</div>				
					<div class="grid_5">					
						<input type="text" name="advs[link][]" value="<?php echo @$item["link"];?>"/>
					</div>
					<div class="grid_1 omega t_a_ui_helper_action">
						<a class="deleteAction deleteAdvs" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
						<a class="deleteAction deleteAdvs en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
					</div>					
				</div>
				<?php endforeach;?>
			</div>
			<div class="grid_12 t_a_bottom">
				<button type="submit"><span style="height:30px; text-align:center; width:auto;" >
					<?php echo $this->translator('mainpage_save_button');?>
				</span></button>			
				<button type="submit" class="en_US"><span style="height:30px; text-align:center; width:auto;" >
					<?php echo trans('mainpage_save_button');?>
				</span></button>			
			</div>
		</div>	
	</form>
	<!-- END FORM ADVS -->
</div>	
<div class="tabs" id="tabs_slogans">	
	<!-- FORM SLOGANS -->
	<form action="" method="post" name="formSlogans" id="formSlogans">
		<input type="hidden" name="action_type" value="slogans"/>
		<div class="clearfix">				
			<div class="grid_12 t_a_ui_breadcrumb">
				<span><?php echo $this->translator('mainpage_slogans');?></span>
				<span class="en_US"><?php echo trans('mainpage_slogans');?></span>
			</div>
			<div class="grid_12 t_a_bottom">
				<div class="grid_8 alpha"><?php echo $this->translator("mainpage_page_title_slogans");?>:</div>
				<div class="grid_8 alpha en_US"><?php echo trans("mainpage_page_title_slogans");?>:</div>
				<div class="grid_4 omega">
					<div class="t_a_right">
						<a class="t_a_ui_button_link btn_add_slogans" href="javascript: void(0);"><span><?php echo $this->translator("mainpage_add_slogans");?></span></a>
						<a class="t_a_ui_button_link btn_add_slogans en_US" href="javascript: void(0);"><span><?php echo trans("mainpage_add_slogans");?></span></a>
					</div>
				</div>
			</div>

			<div class="grid_12 t_a_ui_data_list_header">
				<div class="grid_11 alpha">
					<div><?php echo $this->translator("mainpage_qoute_slogans");?></div>
					<div class="en_US"><?php echo trans("mainpage_qoute_slogans");?></div>
				</div>			
				<div class="grid_1 omega">#</div>
			</div>

			<div class="grid_12 t_a_bottom" id="list_slogans">
				<?php 
					if($this->slogans)
						foreach($this->slogans as $item):
				?>	
				<div class="clearfix t_a_ui_data_list_content">
					<div class="grid_11 alpha">		
						<textarea name="slogans[qoute][]"><?php echo @$item["qoute"];?></textarea>							
					</div>	
					<div class="grid_11 alpha en_US" rel="$(this).prev().find('textarea').val()">		
						<textarea name="slogans[qoute_en][]"><?php echo @$item["qoute_en"];?></textarea>
						<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>						
					</div>					
					<div class="grid_1 omega t_a_ui_helper_action">						
						<a class="deleteAction deleteSlogans" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
						<a class="deleteAction deleteSlogans en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
					</div>
					
				</div>
				<?php endforeach;?>
			</div>
			<div class="grid_12 t_a_bottom">
				<button type="submit"><span style="height:30px; text-align:center; width:auto;" >
					<?php echo $this->translator('mainpage_save_button');?>
				</span></button>			
				<button type="submit" class="en_US"><span style="height:30px; text-align:center; width:auto;" >
					<?php echo trans('mainpage_save_button');?>
				</span></button>			
			</div>
		</div>	
	</form>
	<!-- END FORM SLOGANS -->
</div>	
<div class="tabs" id="tabs_professions">	
	<!-- FORM PROFESSIONS -->
	<form action="" method="post" name="formProfessions" id="formProfessions" enctype="multipart/form-data">
		<input type="hidden" name="action_type" value="professions"/>
		<div class="clearfix">				
			<div class="grid_12 t_a_ui_breadcrumb">
				<span><?php echo $this->translator('mainpage_professions');?></span>
				<span class="en_US"><?php echo trans('mainpage_professions');?></span>
			</div>
			<div class="grid_12 t_a_bottom">
				<div class="grid_7 alpha"><?php echo $this->translator("mainpage_page_title_professions");?>:</div>
				<div class="grid_7 alpha en_US"><?php echo trans("mainpage_page_title_professions");?>:</div>
				<div class="grid_5 omega">
					<div class="t_a_right">
						<a class="t_a_ui_button_link btn_add_professions" href="javascript: void(0);"><span><?php echo $this->translator("mainpage_add_professions");?></span></a>
						<a class="t_a_ui_button_link btn_add_professions en_US" href="javascript: void(0);"><span><?php echo trans("mainpage_add_professions");?></span></a>
					</div>
				</div>
			</div>

			<div class="grid_12 t_a_ui_data_list_header">
				<div class="grid_3 alpha">
					<div><?php echo $this->translator("mainpage_name_professions");?></div>
					<div class="en_US"><?php echo trans("mainpage_name_professions");?></div>
				</div>
				<div class="grid_3">
					<div><?php echo $this->translator("mainpage_img_url_professions");?></div>
					<div class="en_US"><?php echo trans("mainpage_img_url_professions");?></div>
				</div>						
				<div class="grid_5">			
					<div><?php echo $this->translator("mainpage_enterprise_professions");?></div>
					<div class="en_US"><?php echo trans("mainpage_enterprise_professions");?></div>
				</div>
				<div class="grid_1 omega">#</div>
			</div>

			<div class="grid_12 t_a_bottom" id="list_professions">
				<?php 
					if($this->professions)
						foreach($this->professions as $item):
				?>	
				<div class="clearfix t_a_ui_data_list_content">
					<div class="grid_3 alpha">					
						<input type="text" name="professions[name][]" value="<?php echo @$item["name"];?>"/> 	
					</div>				
					<div class="grid_3 alpha en_US" rel="$(this).prev().find('input').val()">					
						<input type="text" name="professions[name_en][]" value="<?php echo @$item["name_en"];?>"/> 
						<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>						
					</div>				
					<div class="grid_3">					
						<input type="file" name="professions_file[]">
						<input type="hidden" name="professions[img_url][]" value="<?php echo @$item["img_url"];?>"/> 	
						<?php if(@$item["img_url"]):?>
							<div class="mainpage_img">
								<label><?php echo $this->translator("mainpage_img");?></label>
								<label class="en_US"><?php echo trans("mainpage_img");?></label>
								<img src="<?php echo @$item["img_url"];?>">
							</div>

						<?php else: ?>	
							<label><?php echo $this->translator("main_page_no_image");?></label>
							<label class="en_US"><?php echo trans("main_page_no_image");?></label>
						<?php endif;?>							
					</div>				
					<div class="grid_5">					
					<input type="text" name="professions[enterprise][]" value="<?php echo implode(',',@$item["enterprise"]);?>"/> 	
					</div>				
					<div class="grid_1 omega t_a_ui_helper_action">
						<a class="deleteAction deleteProfessions" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
						<a class="deleteAction deleteProfessions en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
					</div>
					
				</div>
				<?php endforeach;?>
			</div>
			<div class="grid_12 t_a_bottom">
				<button type="submit"><span style="height:30px; text-align:center; width:auto;" >
					<?php echo $this->translator('mainpage_save_button');?>
				</span></button>			
				<button type="submit" class="en_US"><span style="height:30px; text-align:center; width:auto;" >
					<?php echo trans('mainpage_save_button');?>
				</span></button>			
			</div>
		</div>	
	</form>
	<!-- END FORM PROFESSIONS -->
</div>	
<div style="display:none;">
	<div id="regex_links">
			<div class="clearfix t_a_ui_data_list_content">
				<div class="grid_6 alpha">
					<input type="text" name="links[name][]" value=""/> 	
				</div>	
				<div class="grid_6 alpha en_US" rel="$(this).prev().find('input').val()">
					<input type="text" name="links[name_en][]" value=""/> 	
					<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>						
				</div>				
				<div class="grid_5">
					<input type="text" name="links[url][]" value=""/>
				</div>
				<div class="grid_1 omega t_a_ui_helper_action">
					<a class="deleteAction deleteLinks" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
					<a class="deleteAction deleteLinks en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
				</div>
				
			</div>
	</div>
	<div id="regex_vips">
			<div class="clearfix t_a_ui_data_list_content">
				<div class="grid_4 alpha">		
					<input type="file" name="vips_file[]">
					<input type="hidden" name="vips[img_url][]" value="<?php echo @$item["img_url"];?>"/>
					<label><?php echo $this->translator("main_page_no_image");?></label>
					<label class="en_US"><?php echo trans("main_page_no_image");?></label>
				</div>				
				<div class="grid_4">	
					<div class="grid_4">
						<label style="width:80px;"><?php echo $this->translator("mainpage_vip_name_vips");?></label>
						<label class="en_US" style="width:80px;"><?php echo trans("mainpage_vip_name_vips");?></label>
						<input type="text" name="vips[vip_name][]" value=""/>
					</div>
					<div class="grid_4">
						<label style="width:80px;"><?php echo $this->translator("mainpage_vip_positions_vips");?></label>
						<label class="en_US" style="width:80px;"><?php echo trans("mainpage_vip_positions_vips");?></label>
						<input type="text" name="vips[vip_positions][]" value=""/>
					</div>
					<div class="grid_4 en_US" rel="$(this).prev().find('input').val()">
						<label style="width:80px;"><?php echo $this->translator("mainpage_vip_positions_vips");?></label>
						<label class="en_US" style="width:80px;"><?php echo trans("mainpage_vip_positions_vips");?></label>
						<input type="text" name="vips[vip_positions_en][]" value=""/>
						<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>						
					</div>					
				</div>
				<div class="grid_3">		
					<textarea name="vips[qoute][]"><?php echo @$item["qoute"];?></textarea>
				</div>
				<div class="grid_3 en_US" rel="$(this).prev().find('textarea').val()">		
					<textarea name="vips[qoute_en][]"></textarea>
					<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>											
				</div>
				<div class="grid_1 omega t_a_ui_helper_action">
					<a class="deleteAction deleteVips" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
					<a class="deleteAction deleteVips en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
				</div>				
			</div>				
	</div>
	<div id="regex_advs">
		<div class="clearfix t_a_ui_data_list_content">
			<div class="grid_6 alpha">				
				<input type="file" name="advs_file[]">
				<input type="hidden" name="advs[img_url][]" value=""/> 	
				<label><?php echo $this->translator("main_page_no_image");?></label>
				<label class="en_US"><?php echo trans("main_page_no_image");?></label>
			</div>				
			<div class="grid_5">					
				<input type="text" name="advs[link][]" value=""/>
			</div>
			<div class="grid_1 omega t_a_ui_helper_action">
				<a class="deleteAction deleteAdvs" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
				<a class="deleteAction deleteAdvs en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
			</div>					
		</div>
	</div>
	<div id="regex_slogans">
		<div class="clearfix t_a_ui_data_list_content">
			<div class="grid_11 alpha">		
				<textarea name="slogans[qoute][]"></textarea>							
			</div>	
			<div class="grid_11 alpha en_US" rel="$(this).prev().find('textarea').val()">		
				<textarea name="slogans[qoute_en][]"></textarea>	
				<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>				
			</div>					
			<div class="grid_1 omega t_a_ui_helper_action">						
				<a class="deleteAction deleteSlogans" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
				<a class="deleteAction deleteSlogans en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
			</div>			
		</div>		
	</div>
	<div id="regex_professions">
		<div class="clearfix t_a_ui_data_list_content">
			<div class="grid_3 alpha">					
				<input type="text" name="professions[name][]" value=""/> 	
			</div>				
			<div class="grid_3 alpha en_US" rel="$(this).prev().find('input').val()">					
				<input type="text" name="professions[name_en][]" value=""/>
				<input type="checkbox" class="auto_trans" title="&nbsp;" rel=""/>				
			</div>				
			<div class="grid_3">					
				<input type="file" name="professions_file[]">
				<input type="hidden" name="professions[img_url][]" value=""/> 	
				<label><?php echo $this->translator("main_page_no_image");?></label>
				<label class="en_US"><?php echo trans("main_page_no_image");?></label>
			</div>				
			<div class="grid_5">					
			<input type="text" name="professions[enterprise][]" value=""/> 	
			</div>				
			<div class="grid_1 omega t_a_ui_helper_action">
				<a class="deleteAction deleteProfessions" rel="1" href="javascript: void(0);"><?php echo $this->translator("mainpage_delete");?></a>
				<a class="deleteAction deleteProfessions en_US" rel="1" href="javascript: void(0);"><?php echo trans("mainpage_delete");?></a>
			</div>			
		</div>	
	</div>
</div>
<div class="clearfix"></div>